package cn.wolfcode.trip.admin.controller;

import cn.wolfcode.trip.base.query.MessageQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/message")
public class MessageController {

    @Autowired
    private IMessageService messageService;

    @RequestMapping("/list")
    public String list(Model model, @ModelAttribute("qo") MessageQueryObject qo) {
        model.addAttribute("pageInfo", messageService.query(qo));
        return "messageInfo/list";
    }
}
